The present invention relates to microcomputers each comprising a microprocessor and a program storage memory, particularly to microcomputers capable of holding security among users in installing different programs by a plurality of users.
In recent years, situations have increased in which a plurality of programs are installed in memories beforehand and provided in manufacturing and shipping microcomputers. Since copyrights of the programs installed beforehand in this situation are held by a plurality of different software sellers, it is a problem whether or not the securities of the programs can be secured in successively installing the microcomputers via a plurality of program users.
In Japanese Patent Application Laid-Open No. 7-200413, a microcomputer has been described in which the program memories can be additionally disposed in the outside and in which reading from a built-in address is prohibited in a case where an address for fetching an instruction does not exist in a built-in address space.
In Japanese Patent Application Laid-Open No. 8-272625, a multi-program execution control device and method have been described comprising: setting means for setting at least one of a prohibiting area in which accesses from other programs are prohibited, and a permitting area in which the accesses from the other programs are permitted in each program.
In Japanese Patent Application Laid-Open No. 2000-181898, a microcomputer has been described comprising: a flash memory comprising a first programmable region and a second region to designate whether or not programming is possible with respect to the first region; and a microprocessor which refers to the second region of the flash memory to judge whether or not the programming of the first region can be executed at a time when there is a request for programming from the outside.
In Japanese Patent Application Laid-Open No. 2002-7214, an information processing apparatus has been described comprising: rewrite control means, started by a CPU with generation of an interruption signal, for prohibiting a nonvolatile storage device from being rewritten in a case where an access by software is unjust.
All of these documents Japanese Patent Application Laid-Open Nos. 7-200413, 8-272625, 2000-181898, and 2002-7214 describe the microcomputer provided with a program security function. In the microcomputer, judgment means is disposed for judging whether or not a storage place of an instruction code is a specific memory area with respect to the instruction code for executing the access, and it has been judged whether or not data can be read from the memory using the judgment means at an instruction execution time.
That is, a conventional microcomputer 1 shown in FIG. 13 comprises: a memory 2 to store a predetermined program; a central processing unit (hereinafter referred to as the CPU) 3 which executes a predetermined calculation based on input of a predetermined instruction code; a debug program memory 4 which supplies a debug program to the CPU 1 via an instruction bus; a distinction bit 5a and an instruction code 5b processed in the CPU 3; an address decoder 6 which manages an address of the program stored in the memory 2; and a read controller 7 which controls the reading of the program from the memory based on a read enable signal from the CPU 3.
The microcomputer 1 further comprises: a direct memory access (hereinafter referred to as the DMA) controller 8 which controls a direct access into an internal memory from a memory outside a system; and a chip external bus interface 9 which enables the access to the outside of a chip.
In the conventional microcomputer 1, the distinction bit 5a for distinguishing a memory area of the memory 2 corresponding to the storage place of the instruction code is applied to the instruction code 5b for executing the access, supplied to the CPU 3 via the instruction bus. When the distinction bit 5a is disposed as distinction unit of this instruction code storage place, the program or data stored in an internal memory of a computer system can be protected, and the program security function has been tentatively performed.
However, in the conventional microcomputer, only one memory area to store the program is disposed in the memory. Only one distinction bit is disposed as the distinction unit of the instruction code storage place. Therefore, even when a plurality of program providers install a plurality of programs with respect to one memory, one memory area is accessed to install the program into the internal memory making full use of one distinction bit.
Therefore, when the distinction bit is matched, and the access to the memory is permitted, the program stored by another program provider can be read, and a basic program security function is secured with respect to the internal memory in the computer system. However, there has been a problem that the program security function cannot be secured with respect to the already installed specific program.
That is, in recent years, a memory capacity has increased, and functions have been multiplied by enhancement of a performance. On the other hand, it has been very important to shorten a development period because of a speed of a product cycle. Therefore, a situation in which each core technique has to be entrusted to each technical expert has increased in mounting a plurality of sophisticated core technique in a short development period. In this situation, each of software has to be successively programmed into the memory. However, to hold mutual secrecy of software, in the case of the microcomputer having only one distinction bit as in a conventional example, there has been a problem that there is not any method other than a method of controlling the access by mutual communication using a plurality of microcomputers, or using an operating system (OS).
In this situation, even though each software should be programmed or installed into the memory, in the case where only one distinction bit is used, when the previous seller installs a specific program into a memory, and the next seller receives the memory, is permitted to access the memory by the same distinction bit, and installs a different program, there has been a problem that contents of the already stored program are read by a different program seller.
To that end, there has been a general technique to protect secrecy of software, either by controlling accesses of a plurality of microcomputers each of which has only one distinction bit same as the prior art through mutual communications, or by using the operating system (OS).
Therefore, there is desired a microcomputer capable of securing the security between programs even in a case where different storing persons install a plurality of different programs in the memory.